#ifndef SCREEN_H
#define SCREEN_H

#include <SDL/SDL.h>
#include "gl.h"
#include "img.h"

#ifdef GLES

#define SDL_INIT_FLAGS (SDL_INIT_VIDEO|SDL_INIT_JOYSTICK)
#define VIDEO_FLAGS (SDL_HWPALETTE|SDL_HWACCEL|SDL_FULLSCREEN)

#else // GLES => GL

#define SDL_INIT_FLAGS (SDL_INIT_VIDEO|SDL_INIT_JOYSTICK)
#define VIDEO_FLAGS (SDL_HWPALETTE|SDL_HWACCEL|SDL_OPENGL)

#define WM_ICON "images/cantuna_32x32.png"

#endif // GL

#include <SDL/SDL.h>
#include <glib.h>

#include <string>
using namespace std;

// glOrtho axis sizes
#define WAX 160
#define HAX 120

#define ASPECT ((float) WAX/HAX)

//extern SDL_Surface* screen;

int init_screen();
void kill_screen();

gboolean idle_screen(gpointer data);
bool set_bg(const char* fname);
bool set_bg(Image*);

#endif
/* vim:set ts=2 sts=2 sw=2 noexpandtab: */
